/**
 * GarinDriver -- Eclipse Public License - v 1.0
 * http://www.eclipse.org/legal/epl-v10.html
 */
package garin.parse.sql.mysql;

import garin.parse.LineComment;
import garin.parse.StringToken;
import garin.parse.Token;
import garin.parse.io.Source;

/**
 * @author Mark Farnsworth
 */
public final class SqlStatement extends garin.parse.sql.sql2003.SqlStatement {
	/**
	 * @param p
	 *            source
	 * @throws Exception
	 */
	public SqlStatement(final Source p) throws Exception {
		super(p);
	}
	
	/*
	 * (non-Javadoc)
	 * @see
	 * garin.parse.sql.sql2003.SqlStatement#addStringTokens(garin.parse.Token)
	 */
	@Override
	public void addStringTokens(final Token token) {
		token.add(new StringToken(token, "\"", "\"", true, false));
		token.add(new StringToken(token, "'", "'", true, false));
		token.add(new StringToken(token, "`", "`", true, false));
	}
	
	@Override
	public char identifierQuote() {
		return '`';
	}
	
	@Override
	public void init() throws Exception {
		super.init();
		add(new LineComment(this, "#"));
	}
}
